I would use re.findall here, rather than trying to do a replacement to remove the portions you don't want: ... <看更多>
Search
Search
I would use re.findall here, rather than trying to do a replacement to remove the portions you don't want: ... <看更多>
NSF" a = re.sub("?","a",str) print(a) 這個print出來的錯誤我看不太懂有人能解釋一下嗎?? 謝謝~~ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 122.117.195.230 (臺灣) ... ... <看更多>
請益python re.sub() 使用. 軟體工程師. 2020年10月21日10:33. 事情是這樣的我想寫個功能,可以將病例中的“日期” 格式改變如:2017.03.14 變成2017/03/17 想用re.sub ... ... <看更多>
re.sub — Regular expression operations — Python 3 documentation. re.sub(pattern, repl, string, count=0, flags=0). ... <看更多>